<?php
namespace Apps\Model;
use Phalcon\Mvc\Model;

class Transtype extends Model{

	public $id;
	public $name;
	public $descrip;
	public $pid;

	public function columnMap(){
		return array(
			'id'   =>'id',
			'name' =>'name',
			'descrip' =>'descrip',
			'pid'  =>'pid'

			);
	}

	public function initialize(){
		$this ->setSource('dg_trans_type');
		$this ->hasMany('id','Apps\Model\Bin','trans_type_id');
	}


	// public function getCangwei($parameters=null){
	// 	return $this ->getRelated('Apps\Model\Cangwei',$parameters);
	// }
}